<?php
/* @var $this ClienteController */
/* @var $model Cliente */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'cliente-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Los campos con <span class="required">*</span> son requeridos.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<div class="span-5">
			<?php echo $form->labelEx($model,'nombre'); ?>
			<?php echo $form->textField($model,'nombre',array('size'=>60,'maxlength'=>100)); ?>
			<?php echo $form->error($model,'nombre'); ?>
		</div>
		<div class="span-6 ">
			<?php echo $form->labelEx($model,'nombreContacto'); ?>
			<?php echo $form->textField($model,'nombreContacto',array('size'=>60,'maxlength'=>100)); ?>
			<?php echo $form->error($model,'nombreContacto'); ?>
		</div>
		<div class="span-6">
			<?php echo $form->labelEx($model,'direccion'); ?>
			<?php echo $form->textField($model,'direccion',array('size'=>60,'maxlength'=>100)); ?>
			<?php echo $form->error($model,'direccion'); ?>
		</div>
	</div>

	<div class="row">
		<div class="span-6">
			<?php echo $form->labelEx($model,'localidad'); ?>
			<?php echo $form->dropDownList($model,'localidad',CHtml::listData(Localidad::model()->findAll(),'idlocalidad','nombre'),array('empty'=>'Seleccione la localidad',)); ?>
			<?php echo $form->error($model,'localidad'); ?>
		</div>
		<div class="span-6">
			<?php echo $form->labelEx($model,'telefono'); ?>
			<?php echo $form->textField($model,'telefono',array('size'=>20,'maxlength'=>20)); ?>
			<?php echo $form->error($model,'telefono'); ?>
		</div>
		<div class="span-5">
			<?php echo $form->labelEx($model,'fax'); ?>
			<?php echo $form->textField($model,'fax',array('size'=>20,'maxlength'=>20)); ?>
			<?php echo $form->error($model,'fax'); ?>
		</div>
	</div>
	<div class="row">
		<div class="span-5">
			<?php echo $form->labelEx($model,'email'); ?>
			<?php echo $form->textField($model,'email',array('size'=>45,'maxlength'=>45)); ?>
			<?php echo $form->error($model,'email'); ?>
		</div>
		<div class="span-5">
			<?php echo $form->labelEx($model,'posicion_iva'); ?>
			<?php echo $form->dropDownList($model,'posicion_iva',CHtml::listData(PosicionIva::model()->findAll(),'idposicion_iva','descripcion'),array('empty'=>'Posicion frente al IVA',)); ?>
			<?php echo $form->error($model,'posicion_iva'); ?>
		</div>
		<div class="span-3">
			<?php echo $form->labelEx($model,'cuit'); ?>
			<?php echo $form->textField($model,'cuit',array('size'=>11,'maxlength'=>11)); ?>
			<?php echo $form->error($model,'cuit'); ?>
		</div>
		<div class="span-4">
			<?php echo $form->labelEx($model,'circuito'); ?>
			<?php echo $form->dropDownList($model,'circuito',CHtml::listData(Circuito::model()->findAll(),'idCircuito','descripcion'),array('empty'=>'Forma de Entrega...',)); ?>
			<?php echo $form->error($model,'circuito'); ?>
		</div>
	</div>
	<div class="row">
		<div class="span-5">
			<?php echo $form->labelEx($model,'forma_pago'); ?>
			<?php echo $form->dropDownList($model,'forma_pago',CHtml::listData(Formadepago::model()->findAll(),'idFormadepago','descripcion'),array('empty'=>'Forma de Pago...',)); ?>
			<?php echo $form->error($model,'forma_pago'); ?>
		</div>
		<div class="span-5">
			<?php echo $form->labelEx($model,'descuento'); ?>
			<?php echo $form->textField($model,'descuento',array('size'=>10,'maxlength'=>10)); ?>
			<?php echo $form->error($model,'descuento'); ?>
		</div>
		<div class="span-5">
			<?php echo $form->labelEx($model,'plazo_envio'); ?>
			<?php echo $form->textField($model,'plazo_envio'); ?>
			<?php echo $form->error($model,'plazo_envio'); ?>
		</div>
		<div class="span-2 last">
			<?php echo $form->labelEx($model,'suspendido'); ?>
			<?php echo $form->checkBox($model,'suspendido'); ?>
			<?php echo $form->error($model,'suspendido'); ?>
		</div>
	</div>

	<div class="row">
		<div class="span-17">
			<?php echo $form->labelEx($model,'notas'); ?>
			<?php echo $form->textArea($model,'notas',array('rows'=>6, 'cols'=>50)); ?>
			<?php echo $form->error($model,'notas'); ?>
		</div>
	</div>



	<div class="row buttons">
		<div class="span-2">
			<?php echo CHtml::submitButton($model->isNewRecord ? 'Crear' : 'Guardar'); ?>
		</div>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->